package com.tierstall.client.service;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.tierstall.shared.GruppeDTO;
import com.tierstall.shared.SearchQuery;
import com.tierstall.shared.SessionInvalidException;
import com.tierstall.shared.TierDTO;



@RemoteServiceRelativePath("tierService")
public interface TierService extends RemoteService {
	
	// Tiere
	  TierDTO addTier(String sessionId, TierDTO tier) throws SessionInvalidException;
	  TierDTO updateTier(String sessionId, TierDTO tier) throws SessionInvalidException;
	  TierDTO getTier(String sessionId, String id) throws SessionInvalidException;
	  Boolean deleteTier(String sessionId, String id) throws SessionInvalidException; 
	  ArrayList<TierDTO> importTiere(String sessionId, ArrayList<TierDTO> tiere) throws SessionInvalidException;
	  ArrayList<TierDTO> getTiere(String sessionId) throws SessionInvalidException;
	  ArrayList<TierDTO> queryTiere(String sessionId, SearchQuery query) throws SessionInvalidException;
	  ArrayList<TierDTO> deleteTiere(String sessionId, ArrayList<String> ids) throws SessionInvalidException;
	  
	  // Tiere + Group
	  ArrayList<TierDTO> getTiereByGroup(String sessionId, GruppeDTO group) throws SessionInvalidException;
	  
	  // Group
	  GruppeDTO addGroup(String sessionId, GruppeDTO group) throws SessionInvalidException;
	  GruppeDTO updateGroup(String sessionId, GruppeDTO group) throws SessionInvalidException;
	  GruppeDTO getGroup(String sessionId, String id) throws SessionInvalidException;
	  Boolean deleteGroup(String sessionId, String id) throws SessionInvalidException; 
	  ArrayList<GruppeDTO> getGroups(String sessionId) throws SessionInvalidException;
}
